<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateActProfileRewardLogTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('act_profile_reward_log', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('被奖励用户ID');
            $table->double('reward_coin', 10, 1)->default(0.0)->comment('奖励金币');
            $table->char('reward_type', 10)->default('')->comment('类型');
            $table->timestamps();
            $table->tinyInteger('flag')->default(1)->comment('状态：0-无效，1-有效');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('act_profile_reward_log');
    }
}
